{application, vernemq_plugin,
 [
  {description, "A simple demo Plugin for VerneMQ"},
  {vsn, "0.0.1"},
  {registered, []},
  {applications, [
                  kernel,
                  stdlib
                 ]},
  {mod, { vernemq_plugin_app, []}},
  {env, [
         %% this tells VerneMQ to look in the file 'vernemq_demo_plugin'
         %% for the plugin hook functions. The format is:
         %%  {ModuleName, HookName, Arity, Opts}
         {vmq_plugin_hooks, 
          [
              {vernemq_plugin, auth_on_register, 5, []},
              {vernemq_plugin, auth_on_publish, 6, []},
              {vernemq_plugin, auth_on_subscribe, 3, []},
              {vernemq_plugin, on_client_wakeup, 1, []},
              {vernemq_plugin, on_client_gone, 1, []},
              {vernemq_plugin, on_client_offline, 1, []},
              {vernemq_plugin, on_offline_message, 5, []},
              {vernemq_plugin, on_register, 3, []},
              {vernemq_plugin, on_subscribe, 3, []},
              {vernemq_plugin, on_unsubscribe, 3, []}
          ]}
        ]}
 ]}.
